package com.weixing.mall.provider.controller.admin;


import com.weixing.mall.base.wrapper.Result;
import com.weixing.mall.base.wrapper.ResultUtil;
import com.weixing.mall.core.support.BaseController;
import com.weixing.mall.core.support.auth.AuthUtil;
import com.weixing.mall.core.support.auth.SysAuth;
import com.weixing.mall.provider.model.enums.IsReadEnum;
import com.weixing.mall.provider.service.IUpgradeMsgService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 代理商模块-代理商升级通知 前端控制器
 *
 *
 * @author 0202
 * @since 2020-05-29
 */
@RestController
@RequestMapping("upgradeMsg")
public class UpgradeMsgController extends BaseController {
    @Autowired
    private IUpgradeMsgService upgradeMsgService;

    /**
     * 根据ID查询代理商升级消息
     */
    @GetMapping(value = "")
    public Result selectListByCustomerId(){
        SysAuth auth = AuthUtil.getSysExt();
        return ResultUtil.success(upgradeMsgService.selectListByCustomerId(initMPage(),auth.getUid(), IsReadEnum.NO.getValue()));
    }

}
